<?php
defined('SYSPATH') OR die('No direct access allowed.');
/**
 * pelamarreference.php
 * @author ranuandra
 *
 * 7 Jun 2012 14:35:46
 *
 * 
 */

class Model_Pelamarreference extends ORM
{
		protected $_belons_to = array(
	        'mstpelamar' 		=> array('model'	 => 'mstpelamar'),
	);
	
	private $_field = array('nama', 'perusahaan', 'jabatan', 'hubungan', 'no_telp');
	private $_form = array(
							'nama' 						=> '', 
							'perusahaan'				=> '',
							'jabatan'					=> '',
							'hubungan'					=> '',
							'no_telp'					=> '',
	                      );
	
	public $rules = array(
					'nama' 	 	=> array(
									array('min_length', array(':value', 0)),
								),
					'perusahaan' => array(
									array('min_length', array(':value', 0)),
								),
					'jabatan' => array(
									array('min_length', array(':value', 0)),
								),
					'hubungan' => array(
									array('min_length', array(':value', 0)),
								),
					'no_telp' => array(
									array('min_length', array(':value', 0)),
								),
	);
	
	public function getField()
	{
		return $this->_field;
	}
	
	public function getForm()
	{
		return $this->_form;
		
	}
	
	public function create_data($values)
	{
	    return $this->values($values, $this->_field)->create();
	}	
}